package com.easy.dao;

import com.easy.bean.Orderinfo;
import com.easy.bean.Useraddress;
import com.easy.service.IUserAddressService;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UseraddressDao {

    int add(@Param("useraddress") Useraddress useraddress);

    int edit(@Param("useraddress") Useraddress useraddress);

    int delete(@Param("id") int useraddressid);

    List<Useraddress> getList(@Param("page") Page page, @Param("text") String text,@Param("id")int userid);

    Useraddress getUseraddressById(int useraddressid);

    Useraddress getUseraddress(@Param("useraddress") Useraddress useraddress);

    int getCount(String text);

    int cancelDefault(@Param("id") int useraddressid);
    int setDefault(@Param("userid") int userid,@Param("id") int useraddressid);

    int cancelAllDefault(@Param("userid") int userid);
}
